{include file="public/header" /}

<div class="page">
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
        <tr>
            <th colspan="6">基本信息</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th >项目定制标题：</th>
            <td>{$brand_array.project_title}</td>
            <th>项目定制分类名称：</th>
            <td>{$name}</td>
            <th>项目定制总价：</th>
            <td>{$brand_array.total_price}</td>
        </tr>
        <tr>
            <th >咨询费：</th>
            <td>{$brand_array.fee_price}</td>
            <th>服务费：</th>
            <td>{$brand_array.charge_price}</td>
            <th>实施费：</th>
            <td>{$brand_array.plementation_price}</td>
        </tr>
        <tr>
            <th >收藏量：</th>
            <td>{$brand_array.love_num}</td>
            <th>销量：</th>
            <td>{$brand_array.sale_num}</td>
            <th>创建时间：</th>
            <td>{$brand_array.create_time|date=
                'Y-m-d H:i:s',###}</td>
        </tr>

<!--        <tr class="noborder">-->
<!--            <td class="required">项目定制描述</td>-->
<!--            {:build_editor(['name'=>'article_content'])}-->
<!--            <td class="vatop rowform" colspan="2"><textarea name="project_describe" id="article_content" style="width:90%;height:300px;">{$brand_array.project_describe}</textarea></td>-->
<!--        </tr>-->
    </table>
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
        <tr>
            <th colspan="10">基本文件信息</th>
        </tr>
        </thead>
        <tbody>
        <tr class="noborder">
            <td class="required">视频默认图片:</td>
            <td class="vatop rowform">
                <img width="300px" height="200px" src="{$http_name}/{$brand_array.default_images}" />
            </td>
        </tr>
        <tr class="noborder">
            <td class="required">项目视频:</td>
            <td class="vatop rowform">
                <video width="300" height="300" controls>
                    <source src="{$http_name}/{$brand_array.project_videos}" type="video/mp4">
                </video>
            </td>
        </tr>
        <tr class="noborder">
            <td class="required"> 项目图片:</td>
            <td class="vatop rowform">
                <img width="300px" height="200px" src="{$http_name}/{$brand_array.project_images}" />
            </td>
        </tr>
        <tr>
                <td colspan="2" class="required" id="parts2"><label>项目描述:</label>
                    <textarea value=""  name="science" id="science" style="margin-left: 118px;width: 500px;height: 129px;margin-top: -24px;">{$brand_array.science}</textarea>
                </td>
                <td class="vatop tips"></td>
        </tr>

        <tr class="noborder">
                    <td class="required" style="width: 50px;">项目介绍：</td>
                    {:build_editor(['name'=>'article_content'])}
                    <td class="vatop rowform" colspan="2"><textarea name="project_describe" id="article_content" style="width:90%;height:300px;">{$brand_array.project_describe}</textarea></td>
                </tr>
        </tbody>
    </table>

<!--        <form id="brand_form" method="post" name="form1" enctype="multipart/form-data">-->
<!--            <input type="hidden" name="project_id" value="{$brand_array.project_id}" />-->
<!--            <table class="ds-default-table">-->
<!--                <tbody>-->

<!--            {if empty($brand_array.project_images)}-->
<!--                <tr class="noborder">-->
<!--                <td class="required"> 图片:</td>-->
<!--                <td class="vatop rowform">-->
<!--                  <img width="300px" height="200px" src="{$http_name}/{$brand_array.project_images}" />-->
<!--&lt;!&ndash;                    <span class="type-file-box">&ndash;&gt;-->
<!--&lt;!&ndash;                        <input name="project_images" type="file" class="type-file-file" id="project_images" size="30" hidefocus="true">&ndash;&gt;-->
<!--&lt;!&ndash;                    </span>&ndash;&gt;-->
<!--                </td>-->
<!--              </tr>-->
<!--            {else if/}-->
<!--                    <tr class="noborder">-->
<!--                <td class="required"> 图片:</td>-->
<!--                <td class="vatop rowform">-->
<!--                   <img width="300px" height="200px" src="{$http_name}/{$brand_array.project_images}" />-->
<!--                </td>-->
<!--              </tr>-->
<!--            {/if}-->
<!--                 <tr class="noborder">-->
<!--                    <td class="required">项目定制描述</td>-->
<!--                    {:build_editor(['name'=>'article_content'])}-->
<!--                    <td class="vatop rowform" colspan="2"><textarea name="project_describe" id="article_content" style="width:90%;height:300px;">{$brand_array.project_describe}</textarea></td>-->
<!--                </tr>-->

<!--                <tr class="noborder">-->
<!--                    <td class="required w120"><label >收藏量:</label></td>-->
<!--                    <td class="vatop rowform">{$brand_array.love_num}</td>-->
<!--                </tr>-->
<!--                <tr class="noborder">-->
<!--                    <td class="required w120"><label >销量:</label></td>-->
<!--                    <td class="vatop rowform">{$brand_array.sale_num}</td>-->
<!--                </tr>-->
<!--                </tbody>-->
<!--                <tfoot>-->
<!--                </tfoot>-->
<!--            </table>-->
<!--        </form>-->
    </div>
<script src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js"></script>
<script>
    function call_back(picname){
        $('#brand_pic').val(picname);
        $('#view_img').attr('src','{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_BRAND}/'+picname);
    }
    //按钮先执行验证再提交表单
    $(function(){
        // 编辑分类时清除分类信息
        $('.edit_gcategory').click(function(){
            $('input[name="class_id"]').val('');
            $('input[name="brand_class"]').val('');
        });

        var textButton1="<input type='text' name='textfield' id='textfield1' class='type-file-text' /><input type='button' name='button' id='button1' value='' class='type-file-button' />"
        $(textButton1).insertBefore("#project_images");
        $("#project_images").change(function(){$("#textfield1").val($("#project_images").val());});
        jQuery.validator.addMethod("initial", function(value, element) {
            return /^[A-Za-z0-9]$/i.test(value);
        }, "");
        $("#brand_form").validate({
            errorPlacement: function(error, element){
                error.appendTo(element.parent().parent().find('td:last'));
            },
            rules : {
                brand_name : {
                    required : true,
                    remote   : {
                        url :"{:url('Brand/ajax','branch=check_brand_name')}",
                        type:'get',
                        data:{
                            brand_name : function(){
                                return $('#brand_name').val();
                            },
                            id  : '{$brand_array.project_id}'
                        }
                    }
                },
                brand_initial : {
                    initial  : true
                },
                brand_sort : {
                    number   : true,
                    range : [0,255]
                }
            },
            messages : {
                brand_name : {
                    required : '{$Think.lang.brand_add_name_null}',
                    remote   : '{$Think.lang.brand_add_name_exists}'
                },
                brand_initial : {
                    initial : '{$Think.lang.brand_add_initial}'
                },
                brand_sort  : {
                    number   : '{$Think.lang.brand_add_sort_int}',
                    range : '{$Think.lang.class_sort_explain}'
                }
            }
        });
    });

    gcategoryInit('gcategory');

    function edit_band_goods(ids_str) {

      _uri = ADMINSITEURL+"/Goodproject/edit_band_goods?projectid=" + ids_str;
        dsLayerOpen(_uri,'绑定商品','600px','400px');
    }
</script>